function view_html(req,view_id,method,data){
    if (method === null || method === undefined) {
        method = 'post';
    }
    if (data === null || data === undefined) {
        data = {};
    }
    layui.use(['index', 'user','laytpl'], function() {
        var laytpl = layui.laytpl;
        var $ = layui.$
            , admin = layui.admin
        //请求登入接口
        admin.req({
            url: req  //实际使用请改成服务端真实接口
            , data: data
            , method: method
            , done: function (res) {
                if (res.status == 200) {
                    var data = { //数据
                        "title": "Layui常用模块"
                        , "list": res.data
                    }
                    var getTpl = demo.innerHTML;
                    laytpl(getTpl).render(data, function (html) {
                        $("#" + view_id).html(html);
                    });
                }
            }
        });
    });
}